package guoanmaker.operator.business.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import guoanmaker.operator.business.model.OperatorActivityApplication;
import guoanmaker.operator.business.repository.OperatorActivityApplicationRepository;
/**
 * @author wanghongwei 
 * @ClassName: OperatorActivityApplicationServcie 
 * @Description: OperatorActivityApplicationServcie
 * @date 2017/8/10
 */
@Service
public class OperatorActivityApplicationServcie implements OperatorActivityApplicationServiceInterface {
	private final OperatorActivityApplicationRepository operatorActivityApplicationListRepository;
	 
	 public OperatorActivityApplicationServcie(OperatorActivityApplicationRepository operatorActivityApplicationListRepository ){
		 this.operatorActivityApplicationListRepository= operatorActivityApplicationListRepository;
	 }
	 @Transactional
	@Override
	public OperatorActivityApplication saveActivityApplication(OperatorActivityApplication operatorActivityApplication) {
		return operatorActivityApplicationListRepository.save(operatorActivityApplication);
	}

	@Override
	public List<OperatorActivityApplication> getActivityApplicationById(String id) {
		return operatorActivityApplicationListRepository.queryActivityApplicationList(id);
	}
	 @Transactional
	@Override
	public void deleteActivityApplicationById(String id) {
		operatorActivityApplicationListRepository.delete(id);
	}
	 @Transactional
	@Override
	public void deleteAllActivityApplicationById(String id) {
		operatorActivityApplicationListRepository.deleteAllActivityApplicationById(id);
	}
	 
	 
	  
	  
	  
	  
}
